module.exports = class extends think.Model {
    get relation() {
        return {
            picture: {
                type: think.Model.HAS_MANY,
                key: 'id',
                fKey: 'picparent',
                field: 'picparent,picurl',
                where: {pictype: 1}
            },
            grade: {
                type: think.Model.HAS_MANY,
                key: 'category_id',
                fKey: 'classid',
                field: 'gradeid,classid,grade,picurl,"F" as checked'
            }
        };
    }
};
